<?php echo $this->render('header.phtml');?>
<link rel="stylesheet" type="text/css" href="<?=$this->styleurl?>/js/gallery/jquery.ad-gallery.css">
<script type="text/javascript" src="<?=$this->styleurl?>/js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="<?=$this->styleurl?>/js/gallery/jquery.ad-gallery.js"></script>
<link href="<?=$this->styleurl?>/css/photo.css" rel="stylesheet" type="text/css" />
<link href="<?=$this->styleurl?>/css/book.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
  $(function() {
    $('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.<br>And it contains <strong>H</strong>ow <strong>T</strong>o <strong>M</strong>eet <strong>L</strong>adies... <em>What?</em> That aint what HTML stands for? Man...');
    var galleries = $('.ad-gallery').adGallery({
	 loader_image: '<?=$this->styleurl?>/js/gallery/01.gif', 
	 start_at_index: 0,     //默认选中图片,0开始     
	 thumb_opacity: 0.7,      //小图模糊滤镜效果   
	 animate_first_image: false, //第一张图片是否效果加载   
	 animation_speed: 400,       //动画切换时间   
	 width: false,               //宽定义   
	 height: false,              //高定义   
	 display_next_and_prev: true,//显示上下页(大图)   
	 display_back_and_forward: true,//显示上下页(小图)   
	 scroll_jump: 0, // If 0, it jumps the width of the container   
	 animated_scroll: true,  //是否连续播放/滚动   
	 slideshow: {     
	 enable: true,     //是否显示播放/暂停     
	 autostart: false, //是否载入即播放     
	 speed: 3000,      //播放时间间隔     
	 start_label: 'Start',//播放文字     
	 stop_label: 'Stop',  //暂停文字     
	 stop_on_scroll: true,     
	 countdown_prefix: '(',     
	 countdown_sufix: ')'   
	 },   
	 effect: 'slide-hori', // 切换效果 'slide-vert', 'fade', or 'resize', 'none', false   
	 enable_keyboard_move: false,   
	 cycle: true,   
	 callbacks: {     
	 init: false,     
	 afterImageVisible: false,     
	 beforeImageVisible: false,     
	 slideShowStart: false,     
	 slideShowStop: false   
	 }  
	 });
    $('#toggle-slideshow').click(
      function() {
        galleries[0].toggleSlideshow();
        return false;
      }
    );
  });
</script>
 
<style type="text/css">
#gallery {
padding: 30px;
background: #e1eef5;
}
</style>
<div id="photoshow" style="width:100%;float:left;text-align:center;background-color:#DAFAFE">
	<div id="mainp" style="width:850px;;background-color:#FFFFFF">
			<div id="photoright" style="margin-left:5px;width:180px; float:left; text-align:center;">
				<div id="phototj"> 
			        <div class="phototj0"> 
			           推荐相集
					</div>
			        <div class="phototj1"> 
			             <?php
							foreach ($this->pho_lists as $row):
							if($row["class_id"]==$_GET["cid"]){
								continue;
							}
						?>
							 <div class="pic1">
						     	<div class="picimg1">
						     	<?php
						     		$nopic = true;
							     	if(strstr($row["class_recom_pho"],"default_cover.jpg") == false):
							     	$nopic = false;
							     ?>
							   		<a href="<?php echo $this->baseUrl;?>/photo?cid=<?=$row['class_id']?>">
							   	<?php
							   	endif;
							   	?>	
							   		<img src="<?php echo str_replace(BLOG_ROOT_DIR,BLOG_ROOT_URL,$row['class_recom_pho']); ?>" alt="<?php echo $row['class_name']; ?>" border="0"/>
							   		
							   	<?php
						     	if(!$nopic):
						     	?>
								   </a>
							   <?php
							   endif;
							   ?>
					         	</div>
							 	<div class="pictitle1">
							  		<?php
							     	if(!$nopic):
							     	?>
								  <a href="<?php echo $this->baseUrl;?>/photo?cid=<?=$row['class_id']?>">
								  <?php
								  endif;
								  ?>
								  <?php echo $row['class_name']; ?>
								  <?php
							     	if(!$nopic):
							     	?>
								  </a>
								  <?php
								  endif;
								  ?>
							 	</div>
						     </div>
							 <?php 
							 endforeach;
							 ?>
			            </div>
				</div>
			</div>
			<div id="container" style="float:left; margin-left:5px;">
			    <div id="gallery" class="ad-gallery">
			      <div class="ad-image-wrapper">
			      </div>
			      <div class="ad-controls">
			      </div>
			      <div class="ad-nav">
			        <div class="ad-thumbs">
			 		
			          <ul>
			          <?php 
			          foreach ($this->photos as $row):
			          ?>
			            <li>
			              <a href="<?php echo str_replace(BLOG_ROOT_DIR,BLOG_ROOT_URL,$row['pho_big_img']);?>">
			                <img src="<?php echo str_replace(BLOG_ROOT_DIR,BLOG_ROOT_URL,$row['pho_lit_img']);?>" width="100" height="100"  title="<?=$row["pho_title"]?>" 
			          longdesc="<?php echo str_replace(BLOG_ROOT_DIR,BLOG_ROOT_URL,$row['pho_big_img']);?>" class="image0">
			              </a>
			            </li>
			            <?php
			            endforeach;
			            ?>
			          </ul>
			 
			        </div>
			      </div>
			 
			    </div>
			    <p style="margin-top:5px;margin-bottom:10px;text-align:right;padding-right:10px;">
				<a href="#" id="toggle-slideshow">Toggle slideshow</a>
			    </p>
			  </div>

		<div id="main2" style="padding-left:0px; padding-right:2px; clear:both;width:850px;">
			<div class="content chief-bg">
				<div class="ct-lose">
					<div class="news_comments">
		     			<div class="comments_ct" style="padding-left:0px">
		         			<div class="middle" style="width:800px;">
		          				<p class="comment_note"><a href="#re">签写评论</a></p>	
				<?php 
					$j = 1;
					$p = isset($_GET["p"]) ? $_GET["p"] : 1;
					$p < 0 && $p ==1;
				    foreach ($this->paginator as $row):
				?>  
		         				<div class="comment">
		              				<div class="midd">
		              					<p class="title"><span class="user"><span class="name"><?php echo $row["com_writer"];?></span>
		               					<span class="text">在(<?php echo date('Y-m-d H:i:s',$row["com_date"]);?>)发表</span></span><span class="level"><?php echo 5*($p-1)+$j;$j++;?></span></p>
		               					<p class="note">
		              					<?php echo $row["com_content"];?>
		               					</p>
					  				</div>
		           					<div class="bottom">
		           					</div>
		        				</div>
							<?php 
							endforeach; 
							?>	
							</div>
						<div id="pages" style="text-align:right;">
						 共<?php echo $this->total_comment;?>个评论
 						<?=$this->paginationControl($this->paginator, 'Elastic', 'pagestyle.phtml'); ?>
					</div>
					<div class="replay" style="padding:0px;margin:0px;width:848px;">
						<table border="0" cellpadding="0" style="border-style:solid; border-width:1px; padding:1px; border-collapse: collapse" bordercolor="#CCCCCC" width="848" height="184">
						<tr><td>&nbsp;</td></tr>
						<form action="<?=$this->baseUrl?>/photo/addcom" method="POST" style="margin:0px; padding:0px;">
						<tr>
						<td width="96" height="20">
						  <div align="right" style="font-size:12px">用户名：</div></td>
						<td height="20"><input type="text" name="com_writer" size="16" maxlength="50" value="" />
						&nbsp;&nbsp;
						  <input   readonly="readonly"   type="text"   name="remLen"   size="4"   maxlength="3"   value="100" />个字符</td>
						</tr>
						<tr>
						<td width="96" height="71">
						    <SCRIPT   LANGUAGE="JavaScript">   
						  <!--//   
						  function   textCounter(field,   countfield,   maxlimit)   {   
						  //   定义函数，传入3个参数，分别为表单区的名字，表单域元素名，字符限制；   
						  if   (field.value.length   >   maxlimit)     
						  //如果元素区字符数大于最大字符数，按照最大字符数截断；     
						  field.value   =   field.value.substring(0,   maxlimit);   
						  else   
						  //在记数区文本框内显示剩余的字符数；     
						  countfield.value   =   maxlimit   -   field.value.length;   
						  }   
						  //-->   
						  </SCRIPT>   
						    
						<div align="right" style="font-size:12px">评论内容：</div></td>
						<td height="71"><textarea rows="4" name="com_content" cols="50" onKeyDown="textCounter(this.form.com_content,this.form.remLen,100);"   onKeyUp="textCounter(this.form.com_content,this.form.remLen,100);"></textarea>
						  <input name="cid" type="hidden" id="cid" value="<?php echo $_GET["cid"]; ?>" /><a name="#re" id="#re"></a></td>
						</tr>
						<tr>
						<td height="30" colspan="2">
						  <div align="center">
						    <input type="submit" value="发表" name="hf">
						    <input name="action" type="hidden" id="action" value="add">
						  </div></td>
						</tr>
						<tr>
						<td colspan="2">
						<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
						<tr><td width="100%" height="1" colspan="4"></td></tr>
						</table>      	</td>
						</tr>
						</form>
						</table>
		      		</div>
		   		</div>
			</div>
		</div>
	</div>
</div>
</div>
</div>
<?php 
echo $this->render('foot.phtml');
?>
</body>
</html>